package in.muton.edushare.poll.answers;

import in.muton.edushare.pages.EduShareBasePage;
import in.muton.edushare.pages.common.EdusharePanel;

import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.model.IModel;

import com.edushare.common.vo.PollQuestions;

public class AnswerBase extends EdusharePanel {
	private static final long serialVersionUID = 2116999175280878037L;
	private IModel<PollQuestions> questionModel;

	public AnswerBase(String id, IModel<PollQuestions> model,
			EduShareBasePage page) {
		super(id, model, page);
		this.setQuestionModel(model);
		add(new Label("question", questionModel.getObject()
				.getQuestionSerialNo()
				+ ". " + questionModel.getObject().getQuestion()));
	}

	public void setQuestionModel(IModel<PollQuestions> questionModel) {
		this.questionModel = questionModel;
	}

	public IModel<PollQuestions> getQuestionModel() {
		return questionModel;
	}
    @Override
    public boolean isTransparentResolver(){
      return true;
    }
}
